//
//  XHHUserDefaultsTool.m
//  DHKuaiYi
//
//  Created by xiaohuihui on 2016/11/15.
//  Copyright © 2016年 30-陈辉华. All rights reserved.
//

#import "XHHUserDefaultsTool.h"

@implementation XHHUserDefaultsTool

+ (void)saveBool:(BOOL)b forKey:(NSString *)key {
    
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults setBool:b forKey:key];
    
}
+ (BOOL)boolForKey:(NSString *)key {
    
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    return [defaults boolForKey:key];
    
}

+ (void)saveObject:(id)object forKey:(NSString *)key {
    
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults setObject:object forKey:key];
    
}

+ (id)objetForKey:(NSString *)key {
    
    
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    
    return [defaults objectForKey:key];
    
}

@end
